<script type="text/javascript">
function searchbook(value) {
	if (value.length==13)
    {
			$('#provalibri').slideUp(1000,function(){$('#provalibri').load("smistamento/search.php?codice="+value,'',$('#provalibri').slideDown(1000));}); 
			codice.value="";
	}
}

</script>
<p>EAN:<input id="codice" name='codice' type="text" onkeyup="searchbook(this.value)" maxlength="13" /> </p>
<div id="provalibri"></div>

